var bigImgDom = document.querySelector('.container .rightarea');
var middleContainerDom = document.querySelector('.container .leftarea .checkimgcontainer');
var middleImgDom = document.querySelector('.container .leftarea .checkimgcontainer img');
var maskDom = document.querySelector('.container .leftarea .mask');
var imgListDom = document.querySelector('.container .leftarea .imglist ul');

function init() {
  regiestEvent();
}

function regiestEvent() {
  imgListDom.addEventListener('click', function (e) {
    var target = e.target;
    if (target.nodeName.toLowerCase() === 'img') {
      var strSrc = target.getAttribute('src');
      var subStr = strSrc.substring(0, strSrc.length - 5);

      middleImgDom.setAttribute('src', subStr + '2.jpg');
    }
  });

  middleContainerDom

}

init();
